package net.cloudsun.graph.puzzle.group;

import net.cloudsun.graph.group.AbstractGroupBuilder;
import net.cloudsun.graph.group.FiniteGroup;
import net.cloudsun.graph.puzzle.JigsawState;

/**
 * 组建群
 * created at 25/11/2021
 *
 * @author 俞建波
 * <a href="mailto://yujianbo@chtwm.com">yujianbo@chtwm.com</a>
 * @since 1.2.0
 */
public abstract class AbstractPuzzleGroupBuilder<G extends FiniteGroup<JigsawState>>
        extends AbstractGroupBuilder<JigsawState, G>  {

    @Override
    protected int compare(JigsawState jigsawState, JigsawState t1) {
        return jigsawState.compareTo(t1);
    }

    @Override
    protected JigsawState newElement(String line) {
        return new JigsawState(line);
    }
}
